package com.qfedu.buy.server.controller;

import com.qfedu.buy.server.entity.Ossstorage;
import com.qfedu.buy.server.service.intf.OssstorageService;
import com.qfedu.buy.server.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @program: NeighborBuy
 * @description: 邻里购真正意义上最懂你的新零售平台
 * @author: Feri(老邢)
 * @create: 2021-01-26 14:22:26
 */
@RestController
@RequestMapping("api/ossstorage/")
public class OssstorageController{
    /*
    *注入业务逻辑层对象*/
    @Autowired
    private OssstorageService service;
    /*
    * 新增内容*/
    @PostMapping("save.do")
    public R save(@RequestBody Ossstorage ossstorage){
       return service.save(ossstorage);
    }
    /*
    * 查询 所有数据*/
    @GetMapping("all.do")
    public R all(){
       return service.queryAll();
    }

    @PostMapping("upload.do")
    public R upload(MultipartFile file){
        return service.upload(file);
    }

}